package pc30;

public class J01Account {
	
	//은행 예금 처리 프로그램
	//입력값 : 계좌번호, 통장잔액, 연이율, 월이율, 연이율
	//               인출액,입금액,통장개설일
	public static void main(String[]args){
	
		//1변수 선언 및 초기화
		int aid = 0;
		int balance = 0;
		double  interestRate = 0;
		String dateCreated;//2014-03-11
		double getMonthlyinterestRate;
		int withDraw ;
		int deposit ;
		
		//2 계산 및 연산
		interestRate =4.5;
		getMonthlyinterestRate = interestRate / 12;
		withDraw = 0; 
		 deposit = 0;
		balance = balance + deposit; //입금
		balance = balance - withDraw; //인출
		//변수 초기화없이 수식을 사용하면 오류발생!!
		dateCreated ="2014-03-11";
	
		//3 결과 출력
		System.out.println(aid);
		System.out.println(balance);
		System.out.println(interestRate);
		System.out.println(getMonthlyinterestRate);
		System.out.println(dateCreated);
		System.out.println(withDraw);
		System.out.println(deposit);
		
		//시험값 : 1122,20000,4.5
		//              2500인출,30000인출
		aid = 1122; //계좌번호
		balance = 20000;//잔액
	    interestRate = 4.5;//연이율
	    withDraw = 2500;
	    
	    //계산
       getMonthlyinterestRate = interestRate / 12;
       balance = balance -withDraw;
       
       //결과출력
       System.out.println(aid);
       System.out.println(balance);
       System.out.println(interestRate);
       System.out.println(dateCreated);
       System.out.println(getMonthlyinterestRate);
       System.out.println(withDraw);
       System.out.println(deposit);
	
		//두번째 인출
       //J01Circle 원의둘레,면적을 계산하는 프로그램
       //J01MyAge 자신의 나이를 계산
	}

}
